package com.csy.rabbit.admin.controller;

import com.csy.rabbit.admin.clients.MerchantClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author CSY
 */

@RestController
@RequestMapping("/merchant")
@Slf4j
public class MerchantController {

    @Autowired
    private MerchantClient merchantClient;

    //这个地址不需要跟客户端一致,一般会尽量跟被调用者有点相近
    @GetMapping("/third/method/{str}")
    public void method(@PathVariable String str){
        merchantClient.method(str);
        log.info("请求完成");
    }
}
